package com.atldy.commerce.service;

import com.atldy.commerce.commence.TableId;
import com.atldy.commerce.commence.goods.DeductGoodsInventory;
import com.atldy.commerce.commence.goods.GoodsInfo;
import com.atldy.commerce.commence.goods.SimpleGoodsInfo;
import com.atldy.commerce.pojo.Goods;
import com.atldy.commerce.vo.PageSimpleGoodsInfo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * 商品微服务接口定义
 */
public interface GoodsService extends IService<Goods> {

    /**
     * 查询商品详细信息
     */
    List<GoodsInfo> getGoodsInfos(TableId tableId);

    /**
     * 获取分页商品信息
     */
    PageSimpleGoodsInfo getPageSimpleGoodsInfos(int page);

    /**
     * 根据tableid查询商品简单信息
     */
    List<SimpleGoodsInfo> getSimpleGoodsInfos(TableId tableId);

    /**
     * 扣减库存
     */
    Boolean deductGoodsInventory(List<DeductGoodsInventory> deductGoodsInventory);


}
